﻿using WMS.FC.Domain.PersistenceObject.System;

namespace WMS.FC.Domain.Repository
{
    public interface IUserRepository : IRepositoryBase
    {
        /// <summary>
        /// 根据用户名获取用户
        /// </summary>
        /// <param name="userName"></param>
        /// <returns></returns>
        Task<UserPO?> GetUserByAccount(string userName);

        /// <summary>
        /// 增加登录密码错误次数
        /// </summary>
        /// <param name="userPO"></param>
        /// <returns></returns>
        Task<int> AddLoginError(UserPO userPO);

        /// <summary>
        /// 重置登陆失败
        /// </summary>
        /// <param name="userPO"></param>
        /// <returns></returns>
        Task<int> ResetLoginFail(UserPO userPO);

        /// <summary>
        /// 
        /// </summary>
        /// <param name="userPO"></param>
        /// <returns></returns>
        Task<int> ChangePassword(UserPO userPO);
    }
}
